package com.hm.health.Utils;

import android.os.Environment;


/**
 * Created by chenshi on 2016/10/19.
 */
public class Constans {
    public static final String APP_CRASH_LOG_DIR = Environment.getExternalStorageDirectory() + "/HmHBD/CrashLog";
    public static final String ROMA_DEVICE_NAME    = "com.hm.roma_device_name";
    public static final String ROMA_DEVICE_ADDRESS = "com.hm.roma_device_address";
    public static final String ROMA_DEVICE_TYPE    = "com.hm.roma_device_type";
    public static final String ROMA_DEVICE_NAME2    = "com.hm.roma_device_name_2";
    public static final String ROMA_DEVICE_ADDRESS2 = "com.hm.roma_device_address_2";
    public static final String ROMA_DEVICE_TYPE2    = "com.hm.roma_device_type_2";
    public static final CharSequence DEV_NAME_POLAR = "Polar";
    public static final CharSequence DEV_NAME_ROMA = "Roma";
    public static final String EXTRA_START_ACTIVITY_FOR_RESULT = "extra_start_activity_for_result";
    public static final String EXTRA_REQUEST_ID = "extra_request_id";

    public static final String PERFS_KEY_DEVICE_INFO = "com.hm.iot_key_device_info";

    public static final int WEAR_STATUS_ON = 1;
    public static final int WEAR_STATUS_OFF = 2;


    /**
     * HBD 数据包序号
     */
    public static final int HBD_PACKAGE_INDEX_PPG   = 0;
    public static final int HBD_PACKAGE_INDEX_ACC_X = 1;
    public static final int HBD_PACKAGE_INDEX_ACC_Y = 2;
    public static final int HBD_PACKAGE_INDEX_ACC_Z = 3;
    public static final int HBD_PACKAGE_INDEX_PACK_INDEX = 4;
    public static final int INDEX_G_SENSOR_IS_VALID_INDEX = 5;
    public static final int HBD_PACKAGE_INDEX_HEART_RATE = 6;
    public static final int HBD_PACKAGE_INDEX_QUALITY = 7;

    public static final int ROMA_POLAR_DELAY_TIME = 3;

    public static final String APP_NAME = "HmHBD";

    public static final String HEART_RATE_ROOT_FOLDER = Environment.getExternalStorageDirectory()
            + "/"+ APP_NAME +"/gh30x_others_data/";

    public static final String SERVER_ROMA_RAW_DATA_FOLDER =  Environment.getExternalStorageDirectory()
            + "/"+ APP_NAME +"/server/";

    public static final String TEST_RECORD_ROOT_FOLDER = Environment.getExternalStorageDirectory()
            + "/"+ APP_NAME +"/records/";

    public static final String SECTOR_ROOT_FOLDER = Environment.getExternalStorageDirectory()
            + "/"+ APP_NAME +"/sector/";

    public static final String SPO2_TEST_RECORD_ROOT_FOLDER = Environment.getExternalStorageDirectory() + "/HmHBD/gh30x_spo2_others_data/";
    public static final String PFA_RAW_DATA_FOLDER = Environment.getExternalStorageDirectory() + "/HmHBD/pfa-server/";
    public static final String APP_TYPE_GHBD_DEMO_APP = "HHBD-DEMO";
    public static final String APK_DOWNLOAD_PATH = Environment.getExternalStorageDirectory() + "/HmHBD/app/";

    public static final String GOODIXHBD_FOLDER = Environment.getExternalStorageDirectory() + "/HmHBD/";
    public static final String PERFS_KEY_DEFAULT_CONFIG_NAME = "perfs_key_default_config_name";

    public static final String ARGS_FUNCTION_NAME = "args_function_name";
    public static final String ARGS_CHANNELS_NAME = "args_channels_name";
    public static final String SUCCESS = "SUCCESS";

    public static final String ECG_FLASH_DATA_ROOT = SERVER_ROMA_RAW_DATA_FOLDER + "ecg_flash/";
    public static final String ECG_FLASH_RECORD_ROOT = TEST_RECORD_ROOT_FOLDER + "ecg_flash/";


    /**
     * 心率记录文件格式
     */
    public enum HeartRateFileColumnEnum {
        No,
        Time,
        Polar,
        Roma
    }

    public static final String DEVICE_ADDR_REF_SPO2 = "11:11:11:11:11:11";
    public static final String REF_DEVICE2_ADDRESS = "11:11:11:11:11:12";
    public static final String REF_DEVICE3_ADDRESS = "11:11:11:11:11:13";
    public static final String REF_DEVICE4_ADDRESS = "11:11:11:11:11:14";

    public static String[] DEVICE_ADDRESS_ARRAY = new String[]{
            DEVICE_ADDR_REF_SPO2, REF_DEVICE2_ADDRESS, REF_DEVICE3_ADDRESS, REF_DEVICE4_ADDRESS
    };
}
